package com.sk.cardeal.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sk.cardeal.R;
import com.sk.cardeal.entity.ApplyManageList;

import java.util.List;

/**
 * Created by sk on 2018/1/22.
 */

public class ApplyManageAdapter extends BaseQuickAdapter<ApplyManageList.ResultListBean, BaseViewHolder> {

    public ApplyManageAdapter(int layoutResId, @Nullable List<ApplyManageList.ResultListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ApplyManageList.ResultListBean item) {

        if (item.getState() == 0) {
            helper.setTag(R.id.tag, R.mipmap.wait_get);
        } else {
            helper.setTag(R.id.tag, R.mipmap.already_get);
        }

        helper.setText(R.id.order_num, "工单号：" + item.getCode()).setText(R.id.tv_parts, item.getName());

    }
}
